/*
 * @Author: CQJ
 * @Date: 2022-08-28 23:33:11
 * @LastEditors: CQJ
 * @LastEditTime: 2022-09-02 15:34:25
 * @Description:
 */

import type { FilmListData } from '@/types/site/filmList'
export const PRICE_TYPE: Record<number, any> = {
  1: '免费',
  2: '付费',
  3: '点播'
}

export const column = [
  {
    title: '影片ID',
    dataIndex: 'video_id',
    key: 'video_id',
    width: 190
  },
  {
    title: '影片封面',
    dataIndex: 'video_cover',
    key: 'video_cover'
  },
  {
    title: '影片名称',
    dataIndex: 'video_name',
    key: 'video_name'
  },
  {
    title: '分类/子类',
    key: 'video_categ_name',
    dataIndex: 'video_categ_name'
  },
  {
    title: '所属专辑',
    key: 'video_album_ids',
    dataIndex: 'video_album_ids'
  },
  {
    title: '收费状态',
    key: 'video_price_type', //1-免费 2-付费 3-点播
    dataIndex: 'video_price_type'
  },
  {
    title: '人气',
    key: 'video_popularity',
    dataIndex: 'video_popularity',
    sorter: (a: FilmListData, b: FilmListData) => (a.video_popularity as any) - (b.video_popularity as any),
    showSorterTooltip: false,
    sortDirections: ['descend', 'ascend']
  },
  {
    title: '评分',
    key: 'video_score',
    dataIndex: 'video_score',
    sorter: (a: FilmListData, b: FilmListData) => (a.video_score as any) - (b.video_score as any),
    showSorterTooltip: false,
    sortDirections: ['descend', 'ascend']
  },
  {
    title: '更新时间',
    key: 'updated_at',
    dataIndex: 'updated_at',
    width: 190
  },
  {
    title: '状态',
    key: 'video_status',
    dataIndex: 'video_status'
  },
  {
    title: '操作',
    key: 'action',
    fixed: 'right',
    width: 120
  }
]
